
<!doctype html>
<html>
<head>
<title>项目新增</title> <#include "../../commonUse.html"/>
<link href="${ctx.contextPath}/css/city-picker.css" rel="stylesheet" />
<script src="${ctx.contextPath}/js/city-picker.data.js"></script>
<script src="${ctx.contextPath}/js/city-picker.js"></script>
<script
	src="${ctx.contextPath}/pages/business/project/js/project_add.js"></script>
<script type="text/javascript"
	src="${ctx.contextPath}/js/jquery.form.js"></script>
<script src="${ctx.contextPath}/js/validator.js"></script>


</head>
<body>
	<div class="list-template">
		<div class="m-head m-head-p">
			<div class="left">
				<label class="title">项目新增</label>
			</div>
			<div class="right">
				<div class="flow"></div>
				<!--     <div class="f i-setting f_setting" id="tradeTypeID"></div> -->
			</div>
			<img class="panel-close" src="../images/card-close.png"
				onclick="parent.closeDialogWin();" />
		</div>
		<div class="m-page">
			<form method="post" id="form1" name="form1"
				enctype="multipart/form-data">
				<div class="l-edit" id='main_div'>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td class="font" width="30%">项目名称：<span class="empt">*</span></td>
							<td width="70%"><input type="text" id="name" name="name"
								class="text" maxlength="30" dataType="LimitA"
								msg="项目名称不能为空."></input></td>
						</tr>
						<tr>
							<td class="font" width="30%">承建方：<span class="empt">*</span></td>
							<td width="70%"><input type="text" id="contractor"
								name="contractor" class="text" maxlength="30" dataType="LimitA"
								msg="承建方不能为空."></input></td>
						</tr>
						<tr>
							<td class="font" width="30%">项目开始日期：<span class="empt">*</span></td>
							<td width="70%"><input readonly="readonly" name="bgtime"
								style="width: 200px;" id="bgtime" type="text"
								class="layui-input" dataType="LimitA" msg="开始时间不能为空."
								onclick="WdatePicker({maxDate:'#F{$dp.$D(\'edtime\')}'})" /></td>
						</tr>
						<tr>
							<td class="font" width="30%">项目结束日期：<span class="empt">*</span></td>
							<td width="70%"><input readonly="readonly" name="edtime"
								style="width: 200px;" id="edtime" type="text"
								class="layui-input" dataType="LimitA" msg="结束时间不能为空."
								onclick="WdatePicker({minDate:'#F{$dp.$D(\'bgtime\')}'})" /></td>
						</tr>

						<tr>
							<td class="font" width="30%">工程地点：</td>
							<td width="70%">
								<div class="city-picker-box">
									<input type="text" id="areaCode" name="areaCode" class="text"
										maxlength="50">
								</div> 
								<input type="text" id="addr" name="addr" class="text" style="margin: 5px 0; width: 100%; max-width: 500px;"
								maxlength="50" placeholder="请输入详细地址"></td>
						</tr>
						<tr>
							<td class="font" width="30%">合同扫描件：<span class="empt">*</span></td>
							<td width="70%"><a id="file-name"></a>
								<div class="layui-box layui-upload-button">
									<input onchange="uploadFile();" type="file" name="contract"
										id="contract" multiple="multiple" dataType="LimitA" msg="合同不能为空."
										accept="image/png,image/gif,image/jpeg"
										class="layui-upload-file"> <span
										class="layui-upload-icon"> <i class="layui-icon">&#xe608;</i>选择图片
									</span>
								</div></td>
						</tr>


					</table>
					<div class="edit-btn">
						<ul>
							<li id="checkSaveBtn" class="btn" onclick="projectAdd();">保
								存</li>
						</ul>
					</div>
					<div class="clear"></div>
				</div>
			</form>
		</div>
	</div>
</body>
<script>
	$('#areaCode').citypicker();
	var d = new Date();
    function addzero(v) {if (v < 10) return '0' + v;return v.toString();}
    var s1 = d.getFullYear().toString() +'-'+ addzero(d.getMonth() + 1)+'-' + addzero(d.getDate());
    var s2 = (d.getFullYear()+1).toString() +'-'+ addzero(d.getMonth() + 1)+'-' + addzero(d.getDate());
    document.getElementById('bgtime').value=s1;
    document.getElementById('edtime').value=s2;
</script>
</html>